package com.elong.qadev.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
 * 
* @ClassName: DBLink
* @Description: TODO(数据库链接配置对应model)
* @author kangchen
* @date 2015年10月2日
*
 */
@Entity
@Table(name = "DB_LINK", schema = "ti")
public class DBLink {
	public DBLink(int id, String linkName, String type, String ip, String port,
			String dbName, String userName, String password, String configer,
			Date createTime, String remarks) {
		super();
		this.id = id;
		this.linkName = linkName;
		this.type = type;
		this.ip = ip;
		this.port = port;
		this.dbName = dbName;
		this.userName = userName;
		this.password = password;
		this.configer = configer;
		this.createDate = createTime;
		this.remarks = remarks;
	}
	private int id;
	private String linkName;
	private String type;
	private String ip;
	private String port;
	private String dbName;
	private String userName;
	private String password;
	private String configer;
	private Date createDate;
	@Column(name = "CONFIGER",nullable = false, length = 20)
	public String getConfiger() {
		return configer;
	}
	public void setConfiger(String configer) {
		this.configer = configer;
	}
	
	private String remarks;

	@Temporal(TemporalType.TIMESTAMP)
    @Column(name = "CREATEDATE", length = 7)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public DBLink() {
		super();
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "ID", unique = true, nullable = false, length = 10)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
    @Column(name = "LINKNAME",nullable = true, length = 100)
	public String getLinkName() {
		return linkName;
	}
	public void setLinkName(String linkName) {
		this.linkName = linkName;
	}
	@Column(name = "TYPE",nullable = false, length = 20)
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Column(name = "IP",nullable = false, length = 50)
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	@Column(name = "PORT",nullable = false, length = 10)
	public String getPort() {
		return port;
	}
	public void setPort(String port) {
		this.port = port;
	}
	@Column(name = "DBNAME",nullable = false, length = 20)
	public String getDbName() {
		return dbName;
	}
	public void setDbName(String dbName) {
		this.dbName = dbName;
	}
	@Column(name = "USERNAME",nullable = false, length = 50)
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	@Column(name = "PASSWORD",nullable = false, length = 50)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
    @Column(name = "REMARKS",nullable = true, length = 150)
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	@Override
	public String toString() {
		return "DBLink [id=" + id + ", linkName=" + linkName + ", type=" + type
				+ ", ip=" + ip + ", port=" + port + ", dbName=" + dbName
				+ ", userName=" + userName + ", password=" + password
				+ ", configer=" + configer + ", createTime=" + createDate
				+ ", remarks=" + remarks + "]";
	}
	
	
	
}
